﻿package Classes.Player{
	import flash.display.*;
	import flash.text.TextField;
	import flash.text.TextFormat;
	
	import Classes.*;

	public class PlayerInfo extends MovieClip{
		
		private var fullLife:Number;
		private var fullEnergy:Number;		
		
		private var _hp:Number;		
		private var _ep:Number;		
		private var _score:Number;		
		private var _remains:int;
		private var _mumrockets:int;
		private var _mission:String;
		
		public function PlayerInfo(){
			fullLife = GameSettings.FullLife;
			fullEnergy = GameSettings.FullEnergy;
			mcLifeBar.max = fullLife;
			mcEnergyBar.max = fullEnergy;
			hp = 10;		
			energy = fullEnergy;
			score = 0;
		}
		
		public function set hp(value:Number):void{
			_hp = value;
			mcLifeBar.value = _hp;
		}
		public function get hp():Number	{
			return _hp;
		}
		
		public function set energy(value:Number):void{
			_ep = value;
			mcEnergyBar.value = _ep;
		}
		public function get energy():Number{
			return _ep;
		}
		
		public function set numRockets(value:int):void{
			_mumrockets = value;
			txtRockets.text = _mumrockets.toString();
		}
		
		public function get numRockets():int{
			return _mumrockets;
		}
		
		public function set score(value:Number):void{
			_score = value;
			txtScore.text = _score.toString();
		}
		
		public function get score():Number{
			return _score;
		}
		
		public function set remains(value:Number):void{
			_remains = value;
			txtRemain.text = _remains.toString();
		}
		
		public function get remains():Number{
			return _remains;
		}
		
		public function set mission(value:String):void{
			_mission = value;
			txtMission.text = _mission;
		}
		
		public function get mission():String{
			return _mission;
		}
		
	}
}